<% layout("/inc/layout.html"){ %> 

<%include("/inc/top_banner.html"){} %>

<div class="am-g am-container cms-container">
  <section class="amz-sidebar am-offcanvas-bar am-u-md-3">
    <ul class="am-nav">
      <%
        var sublist = cmsfn.listSubCloumns(column_id);
        for(var sub in sublist){
      %>
        <li class="am-nav-header">${sub.name}</li>
        <%
          var subartlist = cmsfn.listArticleByCloumnId(sub.id);
          var curartid = 0;
          if(isNotEmpty(article)){
            curartid = article.id;
          }
          for(var subart in subartlist){
        %>
        <li><a href="${BASE}/article/${subart.id}" ${subart.id==curartid?"class='active'"}>${subart.title}</a></li>
      <% }} %>
    </ul>
  </section>
  
  <div class="am-u-md-9">
    <% if(isEmpty(article)){ %>
      <h3>文档</h3>
      <p>项目文档！</p>
    <% }else{ %>
      <h3>${article.title}</h3>${article.content}
    <% } %>
  </div>
</div>
<%}%>